package com.hylanda.processor.database.util;

import java.sql.Connection;
import java.sql.DriverManager;

public class SqlServerHelper extends DatabaseAbstractHelper{

	public static Object connectDb(String dbserver, String databaseName, String user,
			String password) throws Exception {
		String JDriver = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
		String connectDB = "jdbc:sqlserver://" + dbserver + ";DatabaseName="+ databaseName;
		// 加载数据库引擎，返回给定字符串名的类
		Class.forName(JDriver);
		Connection con = DriverManager.getConnection(connectDB, user,password);
		return con;
	}
}
